package com.center.biz.impl;

import com.center.api.model.EduWebsiteEhcache;
import com.center.api.remote.RemoteEduWebsiteEhcacheService;
import com.center.biz.dao.EduWebsiteEhcacheMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduWebsiteEhcacheService.class)
public class RemoteEduWebsiteEhcacheServiceImpl implements RemoteEduWebsiteEhcacheService {

    @Autowired
    private EduWebsiteEhcacheMapper eduWebsiteEhcacheMapper;

    @Override
    public int save(EduWebsiteEhcache eduWebsiteEhcache) {
        return eduWebsiteEhcacheMapper.insertSelective(eduWebsiteEhcache);
    }

    @Override
    public int update(EduWebsiteEhcache eduWebsiteEhcache) {
        return eduWebsiteEhcacheMapper.updateByPrimaryKeySelective(eduWebsiteEhcache);
    }

    @Override
    public int delete(int id) {
        return eduWebsiteEhcacheMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduWebsiteEhcache> select(EduWebsiteEhcache eduWebsiteEhcache) {
        return null;
    }

    @Override
    public EduWebsiteEhcache getById(int id) {
        return eduWebsiteEhcacheMapper.selectByPrimaryKey(id);
    }
}
